package com.test.web.controller;

import com.test.web.dao.UserMapper;
import com.test.web.domain.UserDomain;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author lhc
 * @Date 2021/8/10 11:06
 */
@RestController
@RequestMapping("/api")
@AllArgsConstructor
public class APIController {

    private UserMapper userMapper;

    @GetMapping("/test1")
    public List<UserDomain> findAll() {
        return userMapper.selectAll();
    }

    @GetMapping("/test2")
    public List<UserDomain> find2() {
        return userMapper.selectAll();
    }

    @GetMapping("/test3")
    public List<UserDomain> find3() {
        return userMapper.selectAll();
    }

    @GetMapping("/test4")
    public List<UserDomain> find4() {
        return userMapper.selectAll();
    }
}